package com.bai.localshop.pojo.vo;

import lombok.Data;
import java.time.LocalDateTime;

@Data
public class AddressVO {
    private Long id;
    private String consignee;
    private String phone;
    private Integer sex;
    private String provinceCode;
    private String provinceName;
    private String cityCode;
    private String cityName;
    private String districtCode;
    private String districtName;
    private String detail;
    private String label;
    private Integer isDefault;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    public String getFullAddress() {
        return provinceName + cityName + districtName + detail;
    }

    public String getSexText() {
        if (sex == null) return "未知";
        switch (sex) {
            case 1: return "男";
            case 2: return "女";
            default: return "未知";
        }
    }
}